<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__ble__clk__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Functions<div class="ingroups"><a class="el" href="group__group__ble__clk.html">BLE ECO      (Bluetooth&amp;reg; LE ECO Clock)</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gae92f61cd532c63d9547c52ccd6757ff7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__ble__clk__data__type.html#ga4a2842fd4c8c89b7b02871bf0398e000">cy_en_ble_eco_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ble__clk__functions.html#gae92f61cd532c63d9547c52ccd6757ff7">Cy_BLE_EcoConfigure</a> (<a class="el" href="group__group__ble__clk__data__type.html#ga90f34ffaefcfb39107f8f60a2a910b10">cy_en_ble_eco_freq_t</a> freq, <a class="el" href="group__group__ble__clk__data__type.html#gaa50dfcc9b2d385a197421f2262e462ff">cy_en_ble_eco_sys_clk_div_t</a> sysClkDiv, uint32_t cLoad, uint32_t xtalStartUpTime, <a class="el" href="group__group__ble__clk__data__type.html#ga0b65a546765caf85918c9f06e66d25fb">cy_en_ble_eco_voltage_reg_t</a> voltageReg)</td></tr>
<tr class="memdesc:gae92f61cd532c63d9547c52ccd6757ff7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API configures and enables the BLE ECO clock.  <a href="#gae92f61cd532c63d9547c52ccd6757ff7">More...</a><br /></td></tr>
<tr class="separator:gae92f61cd532c63d9547c52ccd6757ff7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga16fab0f8f0dfb9ee67375a5607fef7bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ble__clk__functions.html#ga16fab0f8f0dfb9ee67375a5607fef7bb">Cy_BLE_EcoReset</a> (void)</td></tr>
<tr class="memdesc:ga16fab0f8f0dfb9ee67375a5607fef7bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API resets and disables the BLE ECO clock.  <a href="#ga16fab0f8f0dfb9ee67375a5607fef7bb">More...</a><br /></td></tr>
<tr class="separator:ga16fab0f8f0dfb9ee67375a5607fef7bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb085ed4fdaa3bcf7b0582d72c9e7d2c"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ble__clk__functions.html#gacb085ed4fdaa3bcf7b0582d72c9e7d2c">Cy_BLE_EcoIsEnabled</a> (void)</td></tr>
<tr class="memdesc:gacb085ed4fdaa3bcf7b0582d72c9e7d2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports the Enabled/Disabled BLE ECO status.  <a href="#gacb085ed4fdaa3bcf7b0582d72c9e7d2c">More...</a><br /></td></tr>
<tr class="separator:gacb085ed4fdaa3bcf7b0582d72c9e7d2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gae92f61cd532c63d9547c52ccd6757ff7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae92f61cd532c63d9547c52ccd6757ff7">&#9670;&nbsp;</a></span>Cy_BLE_EcoConfigure()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__ble__clk__data__type.html#ga4a2842fd4c8c89b7b02871bf0398e000">cy_en_ble_eco_status_t</a> Cy_BLE_EcoConfigure </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__ble__clk__data__type.html#ga90f34ffaefcfb39107f8f60a2a910b10">cy_en_ble_eco_freq_t</a>&#160;</td>
          <td class="paramname"><em>freq</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ble__clk__data__type.html#gaa50dfcc9b2d385a197421f2262e462ff">cy_en_ble_eco_sys_clk_div_t</a>&#160;</td>
          <td class="paramname"><em>sysClkDiv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>cLoad</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>xtalStartUpTime</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ble__clk__data__type.html#ga0b65a546765caf85918c9f06e66d25fb">cy_en_ble_eco_voltage_reg_t</a>&#160;</td>
          <td class="paramname"><em>voltageReg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API configures and enables the BLE ECO clock. </p>
<p>If Cy_BLE_Enable() API is called by the application, the stack enables the BLE ECO clock automatically with the following default parameters:</p>
<table class="doxtable">
<tr>
<th>Parameter </th><th>Value  </th></tr>
<tr>
<td>ECO Frequency </td><td>CY_BLE_DEFAULT_ECO_FREQ </td></tr>
<tr>
<td>Divider </td><td>CY_BLE_DEFAULT_ECO_DIV </td></tr>
<tr>
<td>Startup time </td><td>CY_BLE_DEFAULT_OSC_STARTUP_DELAY_LF </td></tr>
<tr>
<td>Load cap </td><td>CY_BLE_DEFAULT_CAP_TRIM_VALUE </td></tr>
</table>
<p>If there is a need to start the BLE ECO with non-default parameters, call the <a class="el" href="group__group__ble__clk__functions.html#gae92f61cd532c63d9547c52ccd6757ff7" title="This API configures and enables the BLE ECO clock. ">Cy_BLE_EcoConfigure()</a> function with the custom configuration each time before calling the Cy_BLE_Enable() function.</p>
<p>This clock is stopped in Deep Sleep and Hibernate power modes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">freq</td><td>- Operating frequency of the crystal, type of <a class="el" href="group__group__ble__clk__data__type.html#ga90f34ffaefcfb39107f8f60a2a910b10">cy_en_ble_eco_freq_t</a>.</td></tr>
    <tr><td class="paramname">sysClkDiv</td><td>- System divider for ECO clock, type of <a class="el" href="group__group__ble__clk__data__type.html#gaa50dfcc9b2d385a197421f2262e462ff">cy_en_ble_eco_sys_clk_div_t</a>.</td></tr>
    <tr><td class="paramname">cLoad</td><td>- ECO crystal load capacitance in multiple of 0.075pF (pF_from_user valid range: 7.5...26.625pF) cLoad = ((pF_from_user - 7.5)/0.075)</td></tr>
    <tr><td class="paramname">xtalStartUpTime</td><td>- ECO crystal startup time in multiple of 31.25us (startup_time_from_user valid range: 400...4593.75us) xtalStartUpTime = startup_time_from_user/31.25</td></tr>
    <tr><td class="paramname">voltageReg</td><td>- BLE Voltage regulator, type of <a class="el" href="group__group__ble__clk__data__type.html#ga0b65a546765caf85918c9f06e66d25fb">cy_en_ble_eco_voltage_reg_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__ble__clk__data__type.html#ga4a2842fd4c8c89b7b02871bf0398e000">cy_en_ble_eco_status_t</a> : The return value indicates if the function succeeded or failed. The possible error codes:</dd></dl>
<table class="doxtable">
<tr>
<th>Error Codes </th><th>Description  </th></tr>
<tr>
<td>CY_BLE_ECO_SUCCESS </td><td>The function completed successfully. </td></tr>
<tr>
<td>CY_BLE_ECO_BAD_PARAM </td><td>The wrong input parameter. </td></tr>
<tr>
<td>CY_BLE_ECO_RCB_CONTROL_LL </td><td>The RCB Control is with BLE Link Layer. </td></tr>
<tr>
<td>CY_BLE_ECO_ALREADY_STARTED </td><td>The BLE ECO clock is already started. </td></tr>
<tr>
<td>CY_BLE_ECO_HARDWARE_ERROR </td><td>The RCB or BLE ECO operation failed. </td></tr>
</table>
<p>For the PSoC 64 devices, there are possible situations when the function returns the PRA error status code. This is because for PSoC 64 devices, the function uses the PRA driver to change the frequency value on the protected side. Refer to <a class="el" href="group__group__pra__enums.html#ga60be13e12e82986f8c0d6c6a6d4f12c5">cy_en_pra_status_t</a> for more details.</p>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* BLE ECO configuration: ECO Frequency: 32 MHZ, Divider: 2 */</span></div><div class="line">    <span class="comment">/* Start-up time(uS): 1500, Load cap(pF): 9.9 */</span></div><div class="line">    </div><div class="line">    uint32_t startTime = (uint32_t)(1500 / 31.25);</div><div class="line">    uint32_t loadCap   = (uint32_t)((9.9 - 7.5) / 0.075);</div><div class="line">    </div><div class="line">    <span class="comment">/* Configure the BLE ECO clock */</span></div><div class="line">    (void) <a class="code" href="group__group__ble__clk__functions.html#gae92f61cd532c63d9547c52ccd6757ff7">Cy_BLE_EcoConfigure</a>(<a class="code" href="group__group__ble__clk__data__type.html#gga90f34ffaefcfb39107f8f60a2a910b10ab18e06510cdcdff510803020cadaed89">CY_BLE_BLESS_ECO_FREQ_32MHZ</a>, <a class="code" href="group__group__ble__clk__data__type.html#ggaa50dfcc9b2d385a197421f2262e462ffadc32f9a281d44abf83fab992d183fd9b">CY_BLE_SYS_ECO_CLK_DIV_2</a>, loadCap, startTime, <a class="code" href="group__group__ble__clk__data__type.html#gga0b65a546765caf85918c9f06e66d25fbabf04e7c9f17091dcbaecd4c80978d021">CY_BLE_ECO_VOLTAGE_REG_AUTO</a>);</div><div class="line">    </div><div class="line">    <span class="comment">/* In case if there is a need to get the BLE ECO frequency */</span></div><div class="line">    uint32_t bleEcoFreq = <a class="code" href="group__group__sysclk__alt__hf__funcs.html#gaf948bdd0d4b0fbf2774642db55eea712">Cy_SysClk_AltHfGetFrequency</a>();</div></div><!-- fragment --> </dd></dl>
<dl class="section user"><dt>Side Effects</dt><dd>The I/O pins will be automatically unfrozen coming out of Hibernate when the BLE ECO is in use.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Limitation: Do not call this API if the BLE is executed with LPM. There is a risk that when the <a class="el" href="group__group__ble__clk__functions.html#gae92f61cd532c63d9547c52ccd6757ff7" title="This API configures and enables the BLE ECO clock. ">Cy_BLE_EcoConfigure()</a> function is called on one core, the BLE is in Deep Sleep mode on the other core. It will cause a fault hard exception. </dd></dl>

</div>
</div>
<a id="ga16fab0f8f0dfb9ee67375a5607fef7bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga16fab0f8f0dfb9ee67375a5607fef7bb">&#9670;&nbsp;</a></span>Cy_BLE_EcoReset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_BLE_EcoReset </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API resets and disables the BLE ECO clock. </p>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="gacb085ed4fdaa3bcf7b0582d72c9e7d2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacb085ed4fdaa3bcf7b0582d72c9e7d2c">&#9670;&nbsp;</a></span>Cy_BLE_EcoIsEnabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE bool Cy_BLE_EcoIsEnabled </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reports the Enabled/Disabled BLE ECO status. </p>
<dl class="section return"><dt>Returns</dt><dd>Boolean status of BLE ECO: true - Enabled, false - Disabled. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
